-- create module table
local _M = {}

-- import global stuff
local _G = _G
local sqrt, sin, cos, print = math.sqrt, math.sin, math.cos, print

_ENV = _M

local loc_var = 'find me'
glob_var = "i'm here!"

function f ()
	print('i am f() inside a mdolue')
end

local function g ()
	print('i am local g() inside a module')
end

return _M

-- XXX: this doesn't work with lua < 5.2
